﻿using System;
using MyAnt.Core.Resource;

namespace MyAnt.Core.Model.World
{
	public class SectorBuilder
	{
		public static ResourceType[, ,] CreateStandardSector(int w, int h, int d)
		{
			var sector = new ResourceType[w, h, d];
			var random = new Random();
			for (var x = 0; x < w; x++)
			{
				for (var y = 0; y < d; y++)
				{
					for (var z = 0; z < h; z++)
					{
						var rVal = random.Next(0, 100);
						var r = ResourceType.Air;
						;
						if (z < d / 2)
						{
							r = rVal < 90 ? ResourceType.Sand : ResourceType.Rock;
						}
						sector[x, y, z] = r;
					}
				}
			}
			return sector;
		}
	}
}
